package smb.controller;

import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
import smb.vo.ScoreVo;
import smb.vo.SectionScore;
import smb.vo.StudentVo;
import smb.service.StudentService;

import java.util.List;

@RestController
@RequestMapping("/student")
@AllArgsConstructor
public class StudentController {
    private StudentService studentService;

    @GetMapping("/{id}")
    public StudentVo getStudent(@PathVariable String id) {
        return studentService.getStudent(id);
    }

    @GetMapping("/{id}/section")
    public List<SectionScore> getScores(@PathVariable String id) {
        return studentService.getScores(id);
    }

}
